#include <time.h>
#include <stdlib.h>
# include <stdio.h>
#define N 30000
main()
{
    float x,y;
    int c=0,d=0;
    rand();
    while (c++<=N)
    {  
        x=rand()%100;
        y=rand()%100;
        if ( x*x+y*y<=10000 )
         d++;
    }
    printf(" pi=%f\n", 4.*d/N);
}